package com.shaozi.nc.mq.translation;

import com.shaozi.data.mq.business.base.MqConsts.UserType;
import com.shaozi.data.mq.business.base.SourceTypeConsts.OA.Crm_Sale;
import com.shaozi.data.mq.business.bean.MQExchangeData;
import com.shaozi.data.mq.business.bean.MQExchangeRuleBean;
import com.shaozi.data.mq.business.bean.MQPushItem;

public class CrmSalePushTranslation extends BaseOaPushTranslation {

	public CrmSalePushTranslation() {

	}

	@Override
	protected int[] onUserType(MQExchangeData data) {
		MQExchangeRuleBean rule = (MQExchangeRuleBean) data.getRule();
		MQPushItem pushItem = rule.getPush();

		switch (pushItem.getSourceType()) {
		case Crm_Sale.BeAdd_Follow_User:
			int[] users1 = { UserType.User1, UserType.User2, UserType.User3 };
			return users1;
		case Crm_Sale.Comment:
		case Crm_Sale.Reply:
			int[] users = { UserType.User1, UserType.User2 };
			return users;
		default:
			int[] ret = { UserType.Undefine };
			return ret;
		}
	}
}
